-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add browserToolEnabled flag to control browser action visibility #1514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add browserToolEnabled flag to control browser action visibility #1514
Conversation
|
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had logic somewhere that only allowed supportsComputerUse to be true if enableBrowserTool was also true. It seemed a little cleaner than passing another variable through everywhere. Seems like it didn’t work as intended though? I wonder if worth a short investigation into why.
Have I missed that? I cannot find that logic. |
This is the line I was thinking of https://github.com/RooVetGit/Roo-Code/blob/224303660bc66d1a89e6918431828671df1b7d6c/src/core/Cline.ts#L1097 |
Damn, you are right. Let me investigate why it didn't work |
I think this is valid, but the line in https://github.com/RooVetGit/Roo-Code/blob/main/src/core/webview/ClineProvider.ts#L1847 causes the Preview Prompt to include browser_action. @mrubens I don't fully get why this exists actually. Why is it asking for tool use capabilities of openRouter there? |
|
Thanks for the fix in #1556! I can close this now right? |
Context
the browser_action instructions were included in system prompt even when Browser usage was turned off in the settings. This PR makes sure that they are only included in system prompt if the browser usage is enabled and the model is supporting computer use.
Implementation
I added
browserToolEnabledto the system prompt everywhere wheresupportsComputerUsewas checked.How to Test
Use a mode that supports computer use, turn Browser tool usage off in the settings, preview system prompt => it should not contain browser_tool instructions.
Use a mode that doesn't support computer use, turn Browser tool usage on in the settings, preview system prompt => it should not contain browser_tool instructions.
Use a mode that supports computer use, turn Browser tool usage on in the settings, preview system prompt => it should contain browser_tool instructions.
Important
Add
browserToolEnabledflag to control browser action visibility, updating logic and tests to ensure browser actions are included only when bothsupportsComputerUseandbrowserToolEnabledare true.browserToolEnabledflag to control browser action visibility insystem.ts,capabilities.ts, andrules.ts.supportsComputerUseandbrowserToolEnabledare true.system.test.tsandClineProvider.test.tsto test scenarios with different combinations ofsupportsComputerUseandbrowserToolEnabled.getCapabilitiesSection(),getRulesSection(), andgetToolDescriptionsForMode()to incorporatebrowserToolEnabledlogic.ClineProviderto handlebrowserToolEnabledstate.This description was created by
for 15cb4ff. It will automatically update as commits are pushed.